package com.briup.demo.dao;
import com.briup.demo.bean.Privilege;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;

public interface PrivilegeMapper {
    @Select("select * from privilege")
    List<Privilege> selectALL();
    @Insert("insert into privilege values(null,#{name},#{icon},#{type},#{introduce},#{parent_id})")
    void insert(Privilege privilege);
    @Update("update privilege set id=#{id},name=#{name},icon=#{icon},type=#{type},introduce=#{introduce},parent_id=#{parent_id} where id=#{id}")
    void update(Privilege privilege);
    @Delete("delete from privilege where id = #{id}")
    void delete(Long id);
}
